﻿//===============================================================================
// Microsoft Innovation Centre - Western Europe
// Copyright (c) 2008 Microsoft Corporation. All rights reserved.
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===============================================================================
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
//===============================================================================

using System.Globalization;
using System.Resources;
using System.Threading;

namespace Microsoft.WVB.Framework
{
    internal sealed class Resx
    {
        private static Resx loader;
        private ResourceManager resources;
        private static object s_InternalSyncObject;

        internal const string EntityVisitor_Author = "EntityVisitor_Author";
        internal const string DataService_UserStateMustBeUnique = "DataService_UserStateMustBeUnique";
        internal const string DataService_ArgumentNotNull = "DataService_ArgumentNotNull";
        internal const string UserManager_Message_SuccessfulSignin = "UserManager_Message_SuccessfulSignin";
        internal const string UserManager_Message_FailedSignIn = "UserManager_Message_FailedSignIn";
        internal const string UserManager_Message_SuccessfulSignUp = "UserManager_Message_SuccessfulSignUp";
        internal const string UserManager_Message_FailedSignUp = "UserManager_Message_FailedSignUp";
        internal const string UserManager_Message_SuccessfulUpdate = "UserManager_Message_SuccessfulUpdate";
        internal const string UserManager_Message_FailedUpdate = "UserManager_Message_FailedUpdate";
        internal const string UserManager_Message_SuccessfullSignOff = "UserManager_Message_SuccessfullSignOff";
        internal const string UserManager_Message_SuccessfullSignFromIsolatedStorage = "UserManager_Message_SuccessfullSignFromIsolatedStorage";
        internal const string UserManager_Message_NotSpecified = "UserManager_Message_NotSpecified";


        static Resx()
        {
            loader = null;
        }

        internal Resx()
        {
            this.resources = new ResourceManager("Microsoft.WVB.Framework.Resources", base.GetType().Assembly);
        }

        private static CultureInfo Culture
        {
            get
            {
                return null;
            }
        }

        public static ResourceManager Resources
        {
            get
            {
                return GetLoader().resources;
            }
        }

        public static object GetObject(string name)
        {
            Resx loader = GetLoader();
            if (loader == null)
            {
                return null;
            }
            return loader.resources.GetObject(name, Culture);
        }

        public static string GetString(string name, params object[] args)
        {
            Resx loader = GetLoader();
            if (loader == null)
            {
                return null;
            }
            string format = loader.resources.GetString(name, Culture);
            if ((args == null) || (args.Length <= 0))
            {
                return format;
            }
            for (int i = 0; i < args.Length; i++)
            {
                string str2 = args[i] as string;
                if ((str2 != null) && (str2.Length > 0x400))
                {
                    args[i] = str2.Substring(0, 0x3fd) + "...";
                }
            }
            return string.Format(CultureInfo.CurrentCulture, format, args);
        } 

        public static string GetString(string name, out bool usedFallback)
        {
            usedFallback = false;
            return GetString(name);
        }

        public static string GetString(string name)
        {
            Resx loader = GetLoader();
            if (loader == null)
            {
                return null;
            }
            return loader.resources.GetString(name, Culture);
        }

        private static Resx GetLoader()
        {
            if (loader == null)
            {
                lock (InternalSyncObject)
                {
                    if (loader == null)
                    {
                        loader = new Resx();
                    }
                }
            }
            return loader;
        }

        private static object InternalSyncObject
        {
            get
            {
                if (s_InternalSyncObject == null)
                {
                    object obj2 = new object();
                    Interlocked.CompareExchange<object>(ref s_InternalSyncObject, obj2, null);
                }
                return s_InternalSyncObject;
            }
        }

    }

    internal sealed class Strings
    {
        internal static string EntityVisitor_Author
        {
            get { return Resx.GetString(Resx.EntityVisitor_Author); }
        }

        internal static string DataService_UserStateMustBeUnique
        {
            get { return Resx.GetString(Resx.DataService_UserStateMustBeUnique); }
        }

        internal static string DataService_ArgumentNotNull
        {
            get { return Resx.GetString(Resx.DataService_ArgumentNotNull); }
        }

        internal static string UserManager_Message_SuccessfulSignin
        {
            get { return Resx.GetString(Resx.UserManager_Message_SuccessfulSignin); }
        }
        internal static string UserManager_Message_FailedSignIn
        {
            get { return Resx.GetString(Resx.UserManager_Message_FailedSignIn); }
        }
        internal static string UserManager_Message_SuccessfulSignUp
        {
            get { return Resx.GetString(Resx.UserManager_Message_SuccessfulSignUp); }
        }
        internal static string UserManager_Message_FailedSignUp
        {
            get { return Resx.GetString(Resx.UserManager_Message_FailedSignUp); }
        }
        internal static string UserManager_Message_SuccessfulUpdate
        {
            get { return Resx.GetString(Resx.UserManager_Message_SuccessfulUpdate); }
        }
        internal static string UserManager_Message_FailedUpdate
        {
            get { return Resx.GetString(Resx.UserManager_Message_FailedUpdate); }
        }
        internal static string UserManager_Message_SuccessfullSignOff
        {
            get { return Resx.GetString(Resx.UserManager_Message_SuccessfullSignOff); }
        }
        internal static string UserManager_Message_SuccessfullSignFromIsolatedStorage
        {
            get { return Resx.GetString(Resx.UserManager_Message_SuccessfullSignFromIsolatedStorage); }
        }
        internal static string UserManager_Message_NotSpecified
        {
            get { return Resx.GetString(Resx.UserManager_Message_NotSpecified); }
        }
        
    }
}
